<%@page contentType="text/html;charset=gb2312"%>
<html>
<body>
<%-- 判断输入的用户名和密码是否正确，如果正确就跳转到页面success.jsp，否则重新回到登录页面 --%>
<%
  String name = request.getParameter("username");            
  String password = request.getParameter("password");   
  
  if(name.equals("admin")&&password.equals("admin")){
  %>
  
  <jsp:forward page="success.jsp">                      
     <jsp:param name="user" value="<%=name%>"/>
  </jsp:forward>
  
  <%
}
else{
%>

  <jsp:forward page="login.jsp">
   <jsp:param name="user" value="<%=name%>"/>
  </jsp:forward>
  
  <%
  }
  %>
</body>
</html>